package cc.zy.base.hr.entity;

import cc.zy.base.common.converter.TimeConverter;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wuwenze.poi.annotation.Excel;
import com.wuwenze.poi.annotation.ExcelField;
import lombok.Data;

import java.util.Date;

/**
 * @author 郝秀峰
 * @time 2022/03/08 19:27:30
 */
@Data
@TableName("t_hr_outside_teacher")
@Excel("外部讲师信息表")
public class OutsideTeacher {

    /**
     *
     */
    @TableId(value = "ID", type = IdType.AUTO)
    private Integer id;

    /**
     *
     */
    @TableField("REAL_NAME")
    @ExcelField(value = "真实姓名")
    private String realName;

    /**
     *
     */
    @TableField("SEX")
    @ExcelField(value = "性别")
    private int sex;

    /**
     *
     */
    @TableField("PHONE")
    @ExcelField(value = "常用手机")
    private String phone;

    /**
     *
     */
    @TableField("BACK_PHONE")
    @ExcelField(value = "备用手机")
    private String backPhone;

    /**
     *
     */
    @TableField("MAIL")
    @ExcelField(value = "邮箱")
    private String mail;

    /**
     *
     */
    @TableField("WXID")
    @ExcelField(value = "微信号")
    private String WXId;

    /**
     *
     */
    @TableField("BANK_REAL_NAME")
    @ExcelField(value = "银行卡账户名")
    private String bankRealName;

    /**
     *
     */
    @TableField("BANK_NAME")
    @ExcelField(value = "银行卡开户银行")
    private String bankName;

    /**
     *
     */
    @TableField("BANK_ADD")
    @ExcelField(value = "银行卡开户地址")
    private String bankAdd;

    /**
     *
     */
    @TableField("BANK_CARD_ID")
    @ExcelField(value = "银行卡卡号")
    private String bankCardId;

    /**
     *
     */
    @TableField("BANK_PIC")
    @ExcelField(value = "银行卡照片")
    private String bankPic;

    /**
     *
     */
    @TableField("STOP")
    @ExcelField(value = "是否禁用")
    private Integer stop;

    /**
     *
     */
    @ExcelField(value = "是否禁用")
    @TableField(exist = false)
    private String stopName;

    /**
     *
     */
    @TableField("CREATE_DATE")
    @ExcelField(value = "创建日期", writeConverter = TimeConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "CTT")
    private Date createDate;

    /**
     *
     */
    @TableField("CREATE_USER_ID")
    @ExcelField(value = "创建用户")
    private Long createUserId;

    /**
     *
     */
    @TableField("LAST_MODIFY_DATE")
    @ExcelField(value = "最后编辑日期", writeConverter = TimeConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "CTT")
    private Date lastModifyDate;

    /**
     *
     */
    @TableField("LAST_MODIFY_USER_ID")
    @ExcelField(value = "最后编辑用户")
    private Long lastModifyUserId;

    /**
     *
     */
    @TableField("REMARK")
    @ExcelField(value = "备注")
    private String remark;

    /**
     *
     */
    @TableField(exist = false)
    @ExcelField(value = "创建人")
    private String createUserName;

    /**
     *
     */
    @TableField(exist = false)
    @ExcelField(value = "修改人")
    private String lastModifyUserName;

    /**
     *
     */
    @TableField(exist = false)
    @ExcelField(value = "性别")
    private String detail;


    /**
     *
     */
    public void setStop(Integer stop) {
        this.stop = stop;
        if(stop == 0){
            setStopName("禁用");
        }else {
            setStopName("启用");
        }
    }
}

